#!/bin/sh

RAILS_ENV=production
export PATH RAILS_ENV

cd /var/www/railsapps/bluecoat

HR="(60*60)"
SQL="delete from sessions WHERE updated_at < now() - (1*$HR)"
CMD="ActiveRecord::Base.connection.delete(\"$SQL\")"

./script/runner "$CMD"
